package cn.xorange.commons.utils.exception;

import cn.xorange.commons.utils.configuration.constants.UtilsErrorCode;

/**
 * @author : yangjian
 * @date : 2023/11/23
 * @description :
 */
public class CatchException extends BaseException{

    CatchException(UtilsErrorCode code){
        super(code.getStatus(), code.getCode(), code.getMsg());
    }

    public static CatchException catchNullException(){
        return new CatchException(UtilsErrorCode.CACHE_NULL);
    }

    public static CatchException catchKeyNullException(){
        return new CatchException(UtilsErrorCode.CACHE_KEY_NULL);
    }

}
